Subject: DLSw version 0.15 Chapter 5 (3 of 3)

From: "Alan K. Bartky, Manager of Technology" <[email-masked]>
Date: Tue, 1 Nov 94 16:29:16 PST

----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Content-Lines: 1
X-Sun-Content-Length: 31

This is the sixth part of 11.

----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: dlsw5c.txt
X-Sun-Content-Lines: 558
X-Sun-Content-Length: 27105

RFC XXXX      DLSw: Switch-to-Switch Protocol   October 1994

   the UA response (DLC_DL_HALTED), the data link is restarted, a
   DL_RESTARTED message is returned to the remote DLSw, and the
   CIRCUIT_ESTABLISHED state is entered.

     Note:  Some implementations will send a Test command in order to
     restart the data link to the target station (i.e., a DLC_START_DL will
     be issued) prior to sending the DL_RESTARTED message.

5.2.12. HALT_PENDING State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive HALT_DL_NOACK|                     | HALT_PENDING_NOACK   |
   +----------------------+---------------------+----------------------+
   | Receive DATAFRAME    | DLC_DGRM            |                      |
   +----------------------+---------------------+----------------------+
   | DLC_DL_HALTED        | Send DL_HALTED      | DISCONNECTED         |
   +----------------------+---------------------+----------------------+
   | DLC_ERROR            | Send DL_HALTED      | DISCONNECTED         |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM             | Send DATAFRAME      |                      |
   +----------------------+---------------------+----------------------+
   | XPORT_FAILURE        |                     | HALT_PENDING_NOACK   |
   +----------------------+---------------------+----------------------+

   The HALT_PENDING state is entered upon the receipt of a HALT_DL message.
   This causes the local DLC to issue a DISC command.  Upon the receipt of
   the UA response (DLC_DL_HALTED), a DL_HALTED message is returned to the
   remote DLSw and the DISCONNECTED state is entered.

5.2.13. HALT_PENDING_NOACK State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive DATAFRAME    | DLC_DGRM            |                      |
   +----------------------+---------------------+----------------------+
   | DLC_DL_HALTED        |                     | DISCONNECTED         |
   +----------------------+---------------------+----------------------+
   | DLC_ERROR            |                     | DISCONNECTED         |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM             | Send DATAFRAME      |                      |
   +----------------------+---------------------+----------------------+

   The HALT_PENDING_NOACK state is entered upon the receipt of a
   HALT_DL_NOACK message.  This causes the local DLC to issue a DISC
   command.  Upon the receipt of the UA response (DLC_DL_HALTED), the
   DISCONNECTED state is entered.

AIW DLSw Related Interest Group           DLSw version 0.15 [Page 42]

RFC XXXX      DLSw: Switch-to-Switch Protocol   October 1994

5.3. NetBIOS Datagrams

   The NetBIOS protocols use a number of UI frames for directory services
   and the transmission of datagrams.  Most of these frames are directed to
   a group MAC address (GA) with the routing information field indicating
   spanning tree explorer (STE) (a.k.a. Single Route Broadcast).  The
   NB_Add_Name_Response and NB_Name_Recognized frames are directed to a
   specific MAC address with the routing information field indicating an
   all routes explorer frame (ARE) (a.k.a. All Routes Broadcast)  The
   NB_Status_Response frame, is directed to a specific MAC address with the
   routing information field indicating a specifically routed frame (SRF).
   The handling of these frames is summarized in the following table.

   +---------------------------+------------------+--------------------+
   |          Event            |     Action(s)    |      Comment       |
   +---------------------------+------------------+--------------------+
   | DLC_DGRM for NETBIOS      | Send NETBIOS_ANQ | Transmitted to all |
   |  group address:           |                  |   remote DLSw      |
   |   NB_Add_Name_Query       |                  |                    |
   +---------------------------+------------------+--------------------+
   | DLC_DGRM for a specific   | Send NETBIOS_ANR | Transmitted to     |
   |  address:                 |                  |   specific DLSw    |
   |   NB_Add_Name_Response    |                  |                    |
   +---------------------------+------------------+--------------------+
   | DLC_DGRM for a specific   | Send DATAFRAME   | Transmitted to all |
   |  address:                 |                  |   remote DLSw      |
   |   NB_Status_Response      |                  |                    |
   +---------------------------+------------------+--------------------+
   | DLC_DGRM for NETBIOS      | Send DATAFRAME   | Transmitted to all |
   |  group address:           |                  |   remote DLSw      |
   |   NB_Name_in_Conflict     |                  |                    |
   |   NB_Add_Group_Name_Query |                  |                    |
   |   NB_Datagram,            |                  |                    |
   |   NB_Datagram_Broadcast   |                  |                    |
   |   NB_Status_Query         |                  |                    |
   |   NB_Terminate_Trace      |                  |                    |
   +---------------------------+------------------+--------------------+

                      Table 5.  NetBIOS DLC Frames

   The above actions do not apply in the following states:
   CIRCUIT_ESTABLISHED, CONTACT_PENDING, CONNECT_PENDING, CONNECTED, and
   CIRCUIT_PENDING.  The handling of the remaining two UI frames used by
   NetBIOS systems, NB_Name_Query and NB_Name_Recognized, are documented as
   part of the DLSw state machine in the previous section (i.e.,
   DISCONNECTED and RESOLVE_PENDING states).  Furthermore, the handling of
   NetBIOS datagrams (i.e., NB_Datagram) sent to a specific MAC address is
   also governed by the DLSw state machine.

     Note:  Some implementations also issue Test frames during the exchange
     of the NetBIOS, NB_Name_Query and NB_Name_Recognized.  This exchange
     of protocol data units occurs during the start of a data link and is
     used to determine the routing information.  Most other implementations
     of NetBIOS will use the NB_Name_Query/NB_Name_Recognized exchange to

AIW DLSw Related Interest Group           DLSw version 0.15 [Page 43]

RFC XXXX      DLSw: Switch-to-Switch Protocol   October 1994

     determine routes in conjunction with resolving the NetBIOS names.
     These differences are not reflected in the SSP protocols.

   The handling of the NetBIOS specific SSP messages is given in the
   following table.

   +---------------+-------------------------+-------------------------+
   |     Event     |        Action(s)        |         Comment         |
   +---------------+-------------------------+-------------------------+
   | NETBIOS_ANQ   | DLC_DGRM:               | Routed STE              |
   |               |    NB_Add_Name_Query    | (NETBIOS Group Address) |
   +---------------+-------------------------+-------------------------+
   | NETBIOS_ANR   | DLC_DGRM:               | Routed ARE              |
   |               |    NB_Add_Name_Response | (Specific MAC Address)  |
   +---------------+-------------------------+-------------------------+
   | NETBIOS_NQ_ex | DLC_DGRM:               | Routed STE              |
   |               |    NB_Name_Query        | (NETBIOS Group Address) |
   +---------------+-------------------------+-------------------------+
   | NETBIOS_NQ_cs | DLC_DGRM:               | Routed STE              |
   |               |    NB_Name_Query        | (NETBIOS Group Address) |
   +---------------+-------------------------+-------------------------+
   | NETBIOS_NR_ex | DLC_DGRM:               | Routed ARE              |
   |               |    NB_Name_Recognized   | (Specific MAC Address)  |
   +---------------+-------------------------+-------------------------+
   | NETBIOS_NR_cs | DLC_DGRM:               | Routed ARE              |
   |               |    NB_Name_Recognized   | (Specific MAC Address)  |
   +---------------+-------------------------+-------------------------+
   | DATAFRAME     | DLC_DGRM                | If NB_Status_Response:  |
   |               |                         |  Routed ARE             |
   |               |                         |  (Specific MAC Address) |
   |               |                         | Else:                   |
   |               |                         |  Routed STE             |
   |               |                         |  (NETBIOS Group Address)|
   +---------------+-------------------------+-------------------------+

                      Table 6.  NetBIOS SSP Messages

   The above actions apply to all DLSw states.  The handling of NetBIOS
   datagrams sent within DGRMFRAME messages is governed by the DLSw state
   machine.  The DGRMFRAME message type is employed instead of the
   DATAFRAME message type once the end-to-end circuit has been established.
   At that time, the message is addressed according to the pair of Circuit
   IDs in the message header instead of relying upon the MAC address
   information in the token ring header.

5.4. Explorer Traffic

   The CANUREACH_ex, ICANREACH_ex, NETBIOS_NQ_ex, and NETBIOS_NR_ex SSP
   messages explore the topology of the DLSw cloud and the networks
   attached to it.  These explorer frames are used to determine the DLSw
   partners through which a MAC or NetBIOS name can be accessed.  This
   information may optionally be cached to reduce explorer traffic in the
   DLSw cloud.

AIW DLSw Related Interest Group           DLSw version 0.15 [Page 44]

RFC XXXX      DLSw: Switch-to-Switch Protocol   October 1994

   If a DLSw is aware from cached information that a given MAC address or
   NetBIOS name is accessible through a given partner DLSw, it should
   direct all circuit setup attempts to that partner.  If the circuit setup
   fails, or no such data is available in the MAC or name cache database,
   the DLSw may fallback to issuing the setup attempt to all DLSw partners
   on the assumption that the cached data is now out of date.  The
   mechanism for determining when to use such a fallback is implementation
   defined.

   DLSw implementations may also use a local MAC cache to enable responses
   to CANUREACH_ex requests to be issued without the need for TEST frame
   exchange (or equivalent) until the CANUREACH_cs is received.  Again, the
   fallback mechanism for determining when such local cache data is out-of-
   date is implementation defined.

   The use of either cache is an optional function in DLSw.  An
   implementation may choose to always issue explorer frames or to use
   either or both types of cache.

   The following sections describe the FSMs used for explorer frames.  The
   DLC events and actions are a subset of those described in section 5.2
   for the main circuit FSM.

5.4.1. CANUREACH/ICANREACH Explorer FSM

   The FSM described below is used to handle explorer frames routed by MAC
   address.  There is one instance of this FSM for each Data Link ID
   (Target and Origin MAC/SAP pair) for which explorer traffic is flowing.
   The states in this FSM are as follows.

   State Name            Description
   ----------            -----------
   RESET                 The initial state.

   SENT_EX               Local DLSw has issued an explorer message

   RECEIVED_EX           Local DLSw has received an explorer message

AIW DLSw Related Interest Group           DLSw version 0.15 [Page 45]

RFC XXXX      DLSw: Switch-to-Switch Protocol   October 1994

5.4.1.1. RESET State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive CANUREACH_ex | If replying from    | If DLC_RESOLVE sent, |
   |                      | cache, send         |   RECEIVED_EX        |
   |                      | ICANREACH_ex        |                      |
   |                      | else if allowed to  |                      |
   |                      | test availability,  |                      |
   |                      | issue DLC_RESOLVE.  |                      |
   |                      | Optionally update   |                      |
   |                      | cache.              |                      |
   +----------------------+---------------------+----------------------+
   | Receive ICANREACH_ex | Optionally update   | RESET                |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+
   | DLC_RESOLVE_C        | Send CANUREACH_ex   | SENT_EX              |
   +----------------------+---------------------+----------------------+

   RESET is the initial state for the CANUREACH/ICANREACH explorer FSM.
   This state is exited when a DLC_RESOLVE_C request is received from the
   DLC or a CANUREACH_ex is received from a remote DLSw.

   A DLSw implementation may optionally reply from to CANUREACH_ex messages
   on the basis of cached topology information, in which case the
   DLC_RESOLVE exchange (i.e. TEST) is not required.  If cache is not used,
   or no match is found, and the DLC permits the use of TEST, DLC_RESOLVE
   is issued to locate the target MAC and the state changes to RECEIVED_EX.
   If no cache entry is available and TEST is not allowed by the DLC, a
   received CANUREACH_ex frame is ignored.

5.4.1.2. SENT_EX State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive ICANREACH_ex | DLC_RESOLVE_R       | RESET                |
   |                      | Optionally update   |                      |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+
   | DLC_RESOLVE_C        |                     | SENT_EX              |
   +----------------------+---------------------+----------------------+

   SENT_EX is entered when the DLSw has issued a CANUREACH_ex message to
   locate a MAC address.  This state is exited when a remote DLSw returns a
   matching ICANREACH_ex, or after an implementation defined timeout.
   DLC_RESOLVE events received in this state correspond to TEST retries by
   the origin DLC station and are absorbed.

   An implementation may choose whether to handle explorer frame crossover
   either by using entirely separate FSM instances and simply allowing both
   ends to issue TEST frames, or by detecting a reverse CANUREACH_ex frame
   here and issuing an ICANREACH_ex message and DLC_RESOLVE_R action.

AIW DLSw Related Interest Group           DLSw version 0.15 [Page 46]

RFC XXXX      DLSw: Switch-to-Switch Protocol   October 1994

5.4.1.3. RECEIVED_EX State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive CANUREACH_ex | Optionally update   | RECEIVED_EX          |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+
   | Receive ICANREACH_ex |                     | RECEIVED_EX          |
   +----------------------+---------------------+----------------------+
   | DLC_RESOLVED         | Send ICANREACH_ex   | RESET                |
   |                      | Optionally update   |                      |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+

   RECEIVED_EX is entered when the DLSw has received a CANUREACH_ex from a
   remote DLSw and has issued a DLC_RESOLVE to locate the MAC address.
   This state is exited when the DLC_RESOLVED response is received, or
   after an implementation defined timeout.

   If the target MAC is located, the DLSw must reply to the first received
   CANUREACH_ex that caused the move to this state.  If additional
   CANUREACH_ex messages are received in this state from other remote DLSw
   partners, the DLSw may optionally reply to these messages too but it is
   not required to do so.

   An implementation may choose whether to handle explorer frame crossover
   either by using entirely separate FSM instances and simply allowing both
   ends to issue TEST frames, or by detecting such a reverse DLC_RESOLVE_C
   event here and issuing an ICANREACH_ex message and DLC_RESOLVE_R action.

5.4.2. NETBIOS_NQ/NR Explorer FSM

   The FSM described below is used to handle explorer frames routed by
   NetBIOS names  There is one instance of this FSM for each unique
   combination of Source Name, Destination Name, Data 2 field and Response
   Correlator.

   State Name            Description
   ----------            -----------
   RESET                 The initial state.

   SENT_EX               Local DLSw has issued an explorer
                         message

   RECEIVED_EX           Local DLSw has received an explorer
                         message

   SENT_REC_EX           An explorer frame has been both sent
                         and received for the same (potential)
                         NetBIOS circuit.

AIW DLSw Related Interest Group           DLSw version 0.15 [Page 47]

RFC XXXX      DLSw: Switch-to-Switch Protocol   October 1994

5.4.2.1. RESET State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive NETBIOS_NQ_ex| DLC_DGRM(NAME_QUERY)| RECEIVED_EX          |
   |                      | Optionally update   |                      |
   |                      | cache.              |                      |
   +----------------------+---------------------+----------------------+
   | Receive NETBIOS_NR_ex| Optionally update   | RESET                |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM (NAME_QUERY)| Send NETBIOS_NQ_ex  | SENT_EX              |
   +----------------------+---------------------+----------------------+

   The RESET state is the initial state for the NETBIOS_NQ/NR explorer FSM.
   It is exited when the DLC receives either a NETBIOS_NQ_ex or a DLC_DGRM
   containing a NetBIOS NAME_QUERY frame.  If a NETBIOS_NQ_ex message is
   received, the NAME_QUERY is propagated to the DLC and this FSM moves to
   state RECEIVED_EX.  If a NetBIOS NAME_QUERY frame is received, the
   NETBIOS_NQ_ex is propagated either to the appropriate DLSw partners (see
   below), and this FSM moves to state SENT_EX.

   Unlike SNA traffic where the CANUREACH_ex/ICANREACH_ex exchange can be
   omitted if the MAC location is already cached,
   NETBIOS_NQ_ex/NETBIOS_NR_ex frames must always be issued during NetBIOS
   session setup in order that the NetBIOS session numbers are exchanged
   correctly between the DLC end stations.  If the location of a NetBIOS
   name is known from cached data, the NETBIOS_NQ_ex need only be issued to
   the cached DLSw partners.  Otherwise the NETBIOS_NQ_ex should be issued
   to all partners that support NetBIOS.

5.4.2.2. SENT_EX State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive NETBIOS_NQ_ex| DLC_DGRM(NAME_QUERY)| SENT_REC_EX          |
   |                      | Optionally update   |                      |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+
   | Receive NETBIOS_NR_ex| DLC_DGRM(NAME_RECOG)| RESET                |
   |                      | Optionally update   |                      |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM (NAME_QUERY)| Send NETBIOS_NQ_ex  | SENT_EX              |
   | (different local     | Optionally update   |                      |
   |  session number than | cache               |                      |
   |  existing searches)  |                     |                      |
   +----------------------+---------------------+----------------------+

AIW DLSw Related Interest Group           DLSw version 0.15 [Page 48]

RFC XXXX      DLSw: Switch-to-Switch Protocol   October 1994

   SENT_EX is entered when the local DLSw issues a NETBIOS_NQ_ex to its
   remote DLSw partners.  This state is exited when a NETBIOS_NR_ex is
   received from a remote DLSw, or if a matching NETBIOS_NQ_ex is received
   from a remote DLSw (i.e. a NETBIOS_NQ_ex crossover case).  If the local
   NetBIOS end station issues a NAME_QUERY with a different session number
   from any previous NAME_QUERY for this search, the NAME_QUERY is
   propagated to the DLSw partners to ensure that the exchange of NetBIOS
   session numbers is handled correctly.
5.4.2.3. RECEIVED_EX State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive NETBIOS_NQ_ex| DLC_DGRM(NAME_QUERY)| RECEIVED_EX          |
   |                      | Optionally update   |                      |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+
   | Receive NETBIOS_NR_ex|                     | RECEIVED_EX          |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM (NAME_QUERY)| Send NETBIOS_NQ_ex  | SENT_REC_EX          |
   |                      | Optionally update   |                      |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM (NAME_RECOG)| Send NETBIOS_NR_ex  | RESET                |
   |                      | Optionally update   |                      |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+

   RECEIVED_EX is entered when the local DLSw receives a NETBIOS_NQ_ex
   message from a remote DLSw.  This state is exited when a NAME_RECOGNIZED
   NetBIOS frame is received from the DLC, completing the query, or when a
   matching NAME_QUERY is received from DLC (i.e. NAME_QUERY crossover).

AIW DLSw Related Interest Group           DLSw version 0.15 [Page 49]

RFC XXXX      DLSw: Switch-to-Switch Protocol   October 1994

5.4.2.4. SENT_REC_EX State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive NETBIOS_NQ_ex| DLC_DGRM(NAME_QUERY)| SENT_REC_EX          |
   |                      | Optionally update   |                      |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+
   | Receive NETBIOS_NR_ex| DLC_DGRM(NAME_RECOG)| RECEIVED_EX          |
   |                      | Optionally update   |                      |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM (NAME_QUERY)| Send NETBIOS_NQ_ex  | SENT_REC_EX          |
   | (different local     | Optionally update   |                      |
   |  session number than | cache               |                      |
   |  existing searches)  |                     |                      |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM (NAME_RECOG)| Send NETBIOS_NR_ex  | SENT_EX              |
   |                      | Optionally update   |                      |
   |                      | cache               |                      |
   +----------------------+---------------------+----------------------+

   This state is required if an implementation wishes to manage NQ/NR
   crossover cases from a single FSM instance by detecting 'opposite'
   NAME_QUERY attempts between the same two NetBIOS names.  If separate FSM
   instances are used instead, this state is not required and the
   transitions to it from other states can be removed.

   SENT_RCV_EX is exited when the NAME_QUERY search in either direction is
   resolved.  If the local NetBIOS end station issues a NAME_QUERY with a
   different session number from any previous NAME_QUERY it has issued for
   this search, the NAME_QUERY is propagated to the DLSw partners to ensure
   that the exchange of NetBIOS session numbers is correctly handled.

5.4.2.5. NetBIOS Session Numbers

   NetBIOS NAME_QUERY and NAME_RECOGNIZED frames exchange NetBIOS session
   numbers between the end stations.  For correct NetBIOS operation over
   DLSw, it is important that all SSP NETBIOS_NQ_ex frames received by a
   DLSw cause NetBIOS NAME_QUERY frames to flow on the LAN with the new
   session number from the NETBIOS_NQ_ex.  These frames cannot be replied
   to from a cache of locally available NetBIOS names in the same way that
   MAC addresses and CANUREACH_ex messages can be handled.

   Also, NAME_QUERY messages are normally retried several times on the LAN.
   The generation and absorption of such frames is outside the scope of the
   FSM defined above.

AIW DLSw Related Interest Group           DLSw version 0.15 [Page 50]